package com.xingen.service.impl;

import com.xingen.domain.Tables;
import com.xingen.mapper.QueryMapper;
import com.xingen.service.CreateService;
import com.xingen.utils.DateToWordUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description :
 * @Author : 辛根
 * @Date : 2020/4/17 11:00
 */
@Service
public class CreateServiceImpl implements CreateService {

    @Autowired
    QueryMapper queryMapper;

    @Autowired
    DateToWordUtil dateToWordUtil;

    @Value("${filePath}")
    private String filePath;//库名

    @Override
    public void getTableInfo(String dataName) {
        List<Tables> tables = queryMapper.getAllTables(dataName);//库名
        dateToWordUtil.toWord(tables, filePath);
    }
}
